
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Gl
	{
		/// <summary>
		/// [GL] Value of GL_ELEMENT_ARRAY_ATI symbol.
		/// </summary>
		[RequiredByFeature("GL_ATI_element_array")]
		public const int ELEMENT_ARRAY_ATI = 0x8768;

		/// <summary>
		/// [GL] Value of GL_ELEMENT_ARRAY_TYPE_ATI symbol.
		/// </summary>
		[RequiredByFeature("GL_ATI_element_array")]
		public const int ELEMENT_ARRAY_TYPE_ATI = 0x8769;

		/// <summary>
		/// [GL] Value of GL_ELEMENT_ARRAY_POINTER_ATI symbol.
		/// </summary>
		[RequiredByFeature("GL_ATI_element_array")]
		public const int ELEMENT_ARRAY_POINTER_ATI = 0x876A;

		/// <summary>
		/// [GL] glElementPointerATI: Binding for glElementPointerATI.
		/// </summary>
		/// <param name="type">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="pointer">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		[RequiredByFeature("GL_ATI_element_array")]
		public static void ElementPointerATI(int type, IntPtr pointer)
		{
			Debug.Assert(Delegates.pglElementPointerATI != null, "pglElementPointerATI not implemented");
			Delegates.pglElementPointerATI(type, pointer);
			LogCommand("glElementPointerATI", null, type, pointer			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glElementPointerATI: Binding for glElementPointerATI.
		/// </summary>
		/// <param name="type">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="pointer">
		/// A <see cref="T:object"/>.
		/// </param>
		[RequiredByFeature("GL_ATI_element_array")]
		public static void ElementPointerATI(int type, object pointer)
		{
			GCHandle pin_pointer = GCHandle.Alloc(pointer, GCHandleType.Pinned);
			try {
				ElementPointerATI(type, pin_pointer.AddrOfPinnedObject());
			} finally {
				pin_pointer.Free();
			}
		}

		/// <summary>
		/// [GL] glDrawElementArrayATI: Binding for glDrawElementArrayATI.
		/// </summary>
		/// <param name="mode">
		/// A <see cref="T:PrimitiveType"/>.
		/// </param>
		/// <param name="count">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GL_ATI_element_array")]
		public static void DrawElementArrayATI(PrimitiveType mode, int count)
		{
			Debug.Assert(Delegates.pglDrawElementArrayATI != null, "pglDrawElementArrayATI not implemented");
			Delegates.pglDrawElementArrayATI((int)mode, count);
			LogCommand("glDrawElementArrayATI", null, mode, count			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glDrawRangeElementArrayATI: Binding for glDrawRangeElementArrayATI.
		/// </summary>
		/// <param name="mode">
		/// A <see cref="T:PrimitiveType"/>.
		/// </param>
		/// <param name="start">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="end">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="count">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GL_ATI_element_array")]
		public static void DrawRangeElementArrayATI(PrimitiveType mode, uint start, uint end, int count)
		{
			Debug.Assert(Delegates.pglDrawRangeElementArrayATI != null, "pglDrawRangeElementArrayATI not implemented");
			Delegates.pglDrawRangeElementArrayATI((int)mode, start, end, count);
			LogCommand("glDrawRangeElementArrayATI", null, mode, start, end, count			);
			DebugCheckErrors(null);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GL_ATI_element_array")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glElementPointerATI(int type, IntPtr pointer);

			[RequiredByFeature("GL_ATI_element_array")]
			[ThreadStatic]
			internal static glElementPointerATI pglElementPointerATI;

			[RequiredByFeature("GL_ATI_element_array")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDrawElementArrayATI(int mode, int count);

			[RequiredByFeature("GL_ATI_element_array")]
			[ThreadStatic]
			internal static glDrawElementArrayATI pglDrawElementArrayATI;

			[RequiredByFeature("GL_ATI_element_array")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDrawRangeElementArrayATI(int mode, uint start, uint end, int count);

			[RequiredByFeature("GL_ATI_element_array")]
			[ThreadStatic]
			internal static glDrawRangeElementArrayATI pglDrawRangeElementArrayATI;

		}
	}

}
